function iosDown() {
    setTimeout(function () {
        location.href = "https://itunes.apple.com/us/app/zhu-duo-duo/id1138606224?l=zh&ls=1&mt=8"
    }, 2000)
}

function androidDown() {
    setTimeout(function () {
        location.href = 'https://qiniu.zhudd.com/zhudd.apk'
    }, 2000)
}


$(".homepage-top button").on("click", function () {
    var u = navigator.userAgent,
        app = navigator.appVersion;
    var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端  
    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器      
    if (isAndroid) {
        // alert("an")
        location.href = "android://main"
        setTimeout(androidDown(), 2000)
    } else {
        // alert("ios")
        location.href = "com.zhudd.appname://"
        setTimeout(iosDown(), 2000)
    }
})